//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS GeoMaps service.
///
///  Integrate high-quality base map data into your applications using MapLibre. Capabilities include:    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.   Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.   Generation of static map images for scenarios where interactive maps aren't suitable, such as:   Embedding in emails or documents   Displaying in low-bandwidth environments   Creating printable maps   Enhancing application performance by reducing client-side rendering
public struct GeoMaps: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the GeoMaps client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "GeoMaps",
            serviceIdentifier: "geo-maps",
            serviceProtocol: .restjson,
            apiVersion: "2020-11-19",
            endpoint: endpoint,
            errorType: GeoMapsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    ///  GetGlyphs returns the map's glyphs.
    @Sendable
    @inlinable
    public func getGlyphs(_ input: GetGlyphsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetGlyphsResponse {
        try await self.client.execute(
            operation: "GetGlyphs", 
            path: "/glyphs/{FontStack}/{FontUnicodeRange}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  GetGlyphs returns the map's glyphs.
    ///
    /// Parameters:
    ///   - fontStack: Name of the FontStack to retrieve.  Example: Amazon Ember Bold,Noto Sans Bold. The supported font stacks are as follows:   Amazon Ember Bold   Amazon Ember Bold Italic   Amazon Ember Bold,Noto Sans Bold   Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold   Amazon Ember Condensed RC BdItalic   Amazon Ember Condensed RC Bold   Amazon Ember Condensed RC Bold Italic   Amazon Ember Condensed RC Bold,Noto Sans Bold   Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold   Amazon Ember Condensed RC Light   Amazon Ember Condensed RC Light Italic   Amazon Ember Condensed RC LtItalic   Amazon Ember Condensed RC Regular   Amazon Ember Condensed RC Regular Italic   Amazon Ember Condensed RC Regular,Noto Sans Regular   Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular   Amazon Ember Condensed RC RgItalic   Amazon Ember Condensed RC ThItalic   Amazon Ember Condensed RC Thin   Amazon Ember Condensed RC Thin Italic   Amazon Ember Heavy   Amazon Ember Heavy Italic   Amazon Ember Light   Amazon Ember Light Italic   Amazon Ember Medium   Amazon Ember Medium Italic   Amazon Ember Medium,Noto Sans Medium   Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium   Amazon Ember Regular   Amazon Ember Regular Italic   Amazon Ember Regular Italic,Noto Sans Italic   Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular   Amazon Ember Regular,Noto Sans Regular   Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular   Amazon Ember Thin   Amazon Ember Thin Italic   AmazonEmberCdRC_Bd   AmazonEmberCdRC_BdIt   AmazonEmberCdRC_Lt   AmazonEmberCdRC_LtIt   AmazonEmberCdRC_Rg   AmazonEmberCdRC_RgIt   AmazonEmberCdRC_Th   AmazonEmberCdRC_ThIt   AmazonEmber_Bd   AmazonEmber_BdIt   AmazonEmber_He   AmazonEmber_HeIt   AmazonEmber_Lt   AmazonEmber_LtIt   AmazonEmber_Md   AmazonEmber_MdIt   AmazonEmber_Rg   AmazonEmber_RgIt   AmazonEmber_Th   AmazonEmber_ThIt   Noto Sans Black   Noto Sans Black Italic   Noto Sans Bold   Noto Sans Bold Italic   Noto Sans Extra Bold   Noto Sans Extra Bold Italic   Noto Sans Extra Light   Noto Sans Extra Light Italic   Noto Sans Italic   Noto Sans Light   Noto Sans Light Italic   Noto Sans Medium   Noto Sans Medium Italic   Noto Sans Regular   Noto Sans Semi Bold   Noto Sans Semi Bold Italic   Noto Sans Thin   Noto Sans Thin Italic   NotoSans-Bold   NotoSans-Italic   NotoSans-Medium   NotoSans-Regular   Open Sans Regular,Arial Unicode MS Regular
    ///   - fontUnicodeRange: A Unicode range of characters to download glyphs for. This must be aligned to multiples of 256.  Example: 0-255.pdf
    ///   - logger: Logger use during operation
    @inlinable
    public func getGlyphs(
        fontStack: String,
        fontUnicodeRange: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetGlyphsResponse {
        let input = GetGlyphsRequest(
            fontStack: fontStack, 
            fontUnicodeRange: fontUnicodeRange
        )
        return try await self.getGlyphs(input, logger: logger)
    }

    ///  GetSprites returns the map's sprites.
    @Sendable
    @inlinable
    public func getSprites(_ input: GetSpritesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSpritesResponse {
        try await self.client.execute(
            operation: "GetSprites", 
            path: "/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  GetSprites returns the map's sprites.
    ///
    /// Parameters:
    ///   - colorScheme: Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome. Example: Light  Default value: Light   Valid values for ColorScheme are case sensitive.
    ///   - fileName:  Sprites API: The name of the sprite ﬁle to retrieve, following pattern sprites(@2x)?\.(png|json). Example: sprites.png
    ///   - style: Style specifies the desired map style for the Sprites APIs.
    ///   - variant: Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style. Example: Default   Valid values for Variant are case sensitive.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSprites(
        colorScheme: ColorScheme,
        fileName: String,
        style: MapStyle,
        variant: Variant,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSpritesResponse {
        let input = GetSpritesRequest(
            colorScheme: colorScheme, 
            fileName: fileName, 
            style: style, 
            variant: variant
        )
        return try await self.getSprites(input, logger: logger)
    }

    ///  GetStaticMap provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.
    @Sendable
    @inlinable
    public func getStaticMap(_ input: GetStaticMapRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetStaticMapResponse {
        try await self.client.execute(
            operation: "GetStaticMap", 
            path: "/static/{FileName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  GetStaticMap provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.
    ///
    /// Parameters:
    ///   - boundedPositions: Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates.   Cannot be used with Zoom and or Radius   Example: 97.170451,78.039098,99.045536,27.176178
    ///   - boundingBox: Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image.  Example: -123.17075,49.26959,-123.08125,49.31429
    ///   - center: Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image. This parameter requires that either zoom or radius is set.  Cannot be used with Zoom and or Radius   Example: 49.295,-123.108
    ///   - colorScheme: Sets color tone for map, such as dark and light for specific map styles. It only applies to vector map styles, such as Standard. Example: Light  Default value: Light   Valid values for ColorScheme are case sensitive.
    ///   - compactOverlay: Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: [Lon, Lat]  Example: line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B   Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.
    ///   - cropLabels: It is a flag that takes in true or false. It prevents the labels that are on the edge of the image from being cut or obscured.
    ///   - fileName: The map scaling parameter to size the image, icons, and labels. It follows the pattern of ^map(@2x)?$. Example: map, map@2x
    ///   - geoJsonOverlay: Takes in a string to draw geometries on the image. The input is a valid GeoJSON collection object.  Example: {"type":"FeatureCollection","features": [{"type":"Feature","geometry":{"type":"MultiPoint","coordinates": [[-90.076345,51.504107],[-0.074451,51.506892]]},"properties": {"color":"#00DD00"}}]}
    ///   - height: Specifies the height of the map image.
    ///   - key: Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
    ///   - labelSize: Overrides the label size auto-calculated by FileName. Takes in one of the values - Small or Large.
    ///   - language: Specifies the language on the map labels using the BCP 47 language tag, limited to ISO 639-1 two-letter language codes. If the specified language data isn't available for the map image, the labels will default to the regional primary language. Supported codes:    ar     as     az     be     bg     bn     bs     ca     cs     cy     da     de     el     en     es     et     eu     fi     fo     fr     ga     gl     gn     gu     he     hi     hr     hu     hy     id     is     it     ja     ka     kk     km     kn     ko     ky     lt     lv     mk     ml     mr     ms     mt     my     nl     no     or     pa     pl     pt     ro     ru     sk     sl     sq     sr     sv     ta     te     th     tr     uk     uz     vi     zh
    ///   - padding: Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.  Value for max and min is determined by: Min: 1  Max: min(height, width)/4   Example: 100
    ///   - pointsOfInterests: Determines if the result image will display icons representing points of interest on the map.
    ///   - politicalView: Specifies the political view, using ISO 3166-2 or ISO 3166-3 country code format. The following political views are currently supported:    ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands    EGY: Egypt's view on Bir Tawil    IND: India's view on Gilgit-Baltistan    KEN: Kenya's view on the Ilemi Triangle    MAR: Morocco's view on Western Sahara    RUS: Russia's view on Crimea    SDN: Sudan's view on the Halaib Triangle    SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands    SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters    SYR: Syria's view on the Golan Heights    TUR: Turkey's view on Cyprus and Northern Cyprus    TZA: Tanzania's view on Lake Malawi    URY: Uruguay's view on Rincon de Artigas    VNM: Vietnam's view on the Paracel Islands and Spratly Islands
    ///   - radius: Used with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value &gt;= 1.  Example: 1500   Cannot be used with Zoom.   Unit: Meters
    ///   - scaleBarUnit: Displays a scale on the bottom right of the map image with the unit specified in the input.  Example: KilometersMiles, Miles, Kilometers, MilesKilometers
    ///   - style:  Style specifies the desired map style.
    ///   - width: Specifies the width of the map image.
    ///   - zoom: Specifies the zoom level of the map image.  Cannot be used with Radius.
    ///   - logger: Logger use during operation
    @inlinable
    public func getStaticMap(
        boundedPositions: String? = nil,
        boundingBox: String? = nil,
        center: String? = nil,
        colorScheme: ColorScheme? = nil,
        compactOverlay: String? = nil,
        cropLabels: Bool? = nil,
        fileName: String,
        geoJsonOverlay: String? = nil,
        height: Int,
        key: String? = nil,
        labelSize: LabelSize? = nil,
        language: String? = nil,
        padding: Int? = nil,
        pointsOfInterests: MapFeatureMode? = nil,
        politicalView: String? = nil,
        radius: Int64? = nil,
        scaleBarUnit: ScaleBarUnit? = nil,
        style: StaticMapStyle? = nil,
        width: Int,
        zoom: Float? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetStaticMapResponse {
        let input = GetStaticMapRequest(
            boundedPositions: boundedPositions, 
            boundingBox: boundingBox, 
            center: center, 
            colorScheme: colorScheme, 
            compactOverlay: compactOverlay, 
            cropLabels: cropLabels, 
            fileName: fileName, 
            geoJsonOverlay: geoJsonOverlay, 
            height: height, 
            key: key, 
            labelSize: labelSize, 
            language: language, 
            padding: padding, 
            pointsOfInterests: pointsOfInterests, 
            politicalView: politicalView, 
            radius: radius, 
            scaleBarUnit: scaleBarUnit, 
            style: style, 
            width: width, 
            zoom: zoom
        )
        return try await self.getStaticMap(input, logger: logger)
    }

    ///  GetStyleDescriptor returns information about the style.
    @Sendable
    @inlinable
    public func getStyleDescriptor(_ input: GetStyleDescriptorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetStyleDescriptorResponse {
        try await self.client.execute(
            operation: "GetStyleDescriptor", 
            path: "/styles/{Style}/descriptor", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  GetStyleDescriptor returns information about the style.
    ///
    /// Parameters:
    ///   - colorScheme: Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome. Example: Light  Default value: Light   Valid values for ColorScheme are case sensitive.
    ///   - key: Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
    ///   - politicalView: Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format. The following political views are currently supported:    ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands    EGY: Egypt's view on Bir Tawil    IND: India's view on Gilgit-Baltistan    KEN: Kenya's view on the Ilemi Triangle    MAR: Morocco's view on Western Sahara    RUS: Russia's view on Crimea    SDN: Sudan's view on the Halaib Triangle    SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands    SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters    SYR: Syria's view on the Golan Heights    TUR: Turkey's view on Cyprus and Northern Cyprus    TZA: Tanzania's view on Lake Malawi    URY: Uruguay's view on Rincon de Artigas    VNM: Vietnam's view on the Paracel Islands and Spratly Islands
    ///   - style: Style specifies the desired map style.
    ///   - logger: Logger use during operation
    @inlinable
    public func getStyleDescriptor(
        colorScheme: ColorScheme? = nil,
        key: String? = nil,
        politicalView: String? = nil,
        style: MapStyle,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetStyleDescriptorResponse {
        let input = GetStyleDescriptorRequest(
            colorScheme: colorScheme, 
            key: key, 
            politicalView: politicalView, 
            style: style
        )
        return try await self.getStyleDescriptor(input, logger: logger)
    }

    ///  GetTile returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.
    @Sendable
    @inlinable
    public func getTile(_ input: GetTileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetTileResponse {
        try await self.client.execute(
            operation: "GetTile", 
            path: "/tiles/{Tileset}/{Z}/{X}/{Y}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  GetTile returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.
    ///
    /// Parameters:
    ///   - key: Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
    ///   - tileset: Specifies the desired tile set. Valid Values: raster.satellite | vector.basemap
    ///   - x: The X axis value for the map tile. Must be between 0 and 19.
    ///   - y: The Y axis value for the map tile.
    ///   - z: The zoom value for the map tile.
    ///   - logger: Logger use during operation
    @inlinable
    public func getTile(
        key: String? = nil,
        tileset: String,
        x: String,
        y: String,
        z: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetTileResponse {
        let input = GetTileRequest(
            key: key, 
            tileset: tileset, 
            x: x, 
            y: y, 
            z: z
        )
        return try await self.getTile(input, logger: logger)
    }
}

extension GeoMaps {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: GeoMaps, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}
